package com.ghxxzx.dagl.utils;

import com.ghxxzx.dagl.entity.ClPath;
import com.ghxxzx.dagl.mapper.ClPathMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import java.nio.file.Path;

@Service
public class PathUtils {
    @Autowired
    private ClPathMapper clPathMapper;
    private String path;

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    @PostConstruct
    public String initPath(){
        ClPath clPath = clPathMapper.selectPath();
        path=clPath.getPath();
        return path;
    }
}
